<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Smstemplate/index')}">模板列表</a></li>
			<li><a href="{:U('Smstemplate/add')}">添加模板</a></li>
		</ul>
        <form class="well form-search" method="post" action="{:U('Smstemplate/index')}">
			模板编号:
			<input type="text" name="sms_code" style="width: 130px;" value="{:I('request.sms_code/s','')}" placeholder="请输入模板编号">
			模板名称:
			<input type="text" name="sms_name" style="width: 130px;" value="{:I('request.sms_name/s','')}" placeholder="请输入模板名称">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:U('Smstemplate/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>模板编号</th>
					<th>模板名称</th>
					<th>模板内容</th>
					<th width="50">{:L('STATUS')}</th>
					<th width="100">{:L('ACTIONS')}</th>
				</tr>
			</thead>
			<style>td{word-break:break-all;}</style>
			<tbody>
				<php>$sms_statuses=array("0"=>禁用,"1"=>启用);</php>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.sms_code}</td>
					<td>{$vo.sms_name}</td>
					<td>{$vo.sms_content}</td>
					<td>{$sms_statuses[$vo['use_flg']]}</td>
					<td>
						<a href='{:U("Smstemplate/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
						<a class="js-ajax-delete" href="{:U('Smstemplate/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>